package com.item.mall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 张津瑞、彭家博
 * @since 2021-07-31
 */
@Data
  @EqualsAndHashCode(callSuper = false)
  @Accessors(chain = true)
@NoArgsConstructor
public class UserAddress implements Serializable {

    private static final long serialVersionUID=1L;

      /**
     * 主键id
     */
        @TableId(value = "id", type = IdType.AUTO)
      private Integer id;

      /**
     * 用户主键
     */
      private Integer userId;

      /**
     * 收货人
     */
      private String consignee;

      /**
       * 省
       */
      private String province;

      /**
       * 市
       */
      private String city;


      /**
       * 区
       */
      private String area;


        /**
       * 详细地址
       */
        private String address;


      /**
       * 电话
       */
      private String phone;

      /**
     * 是否是默认地址（1:是 0否）
     */
      private Integer isdefault;

      /**
     * 创建时间
     */
        @TableField(fill = FieldFill.INSERT)
      private LocalDateTime createTime;

      @TableField(fill = FieldFill.INSERT_UPDATE)
      private LocalDateTime updateTime;

      public UserAddress(Integer userId, String consignee, String province, String city, String area, String address, String phone, Integer isdefault) {
        this.userId = userId;
        this.consignee = consignee;
        this.province = province;
        this.city = city;
        this.area = area;
        this.address = address;
        this.phone = phone;
        this.isdefault = isdefault;
      }
}
